package com.time.admin.common.enums;

import lombok.Getter;

/**
 * 审核状态枚举类
 *
 * @author: HuangQi
 * @date: Created in 9:57 2025/11/3
 * @description: 审核状态枚举类
 */
@Getter
public enum AuditStatusEnum {

    UN_KOWN(-1, "非申请友链"),
    PENDING_AUDIT(0, "审核中"),
    PENDING(1, "审核通过"),
    UN_PASS(2, "审核失败");

    public int code;

    public String desc;

    AuditStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuditStatusEnum getByCode(int codeVal) {
        for (AuditStatusEnum auditStatusEnum : AuditStatusEnum.values()) {
            if (auditStatusEnum.code == codeVal) {
                return auditStatusEnum;
            }
        }
        return null;
    }
}
